﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using TiaoTaoHelper.Wtm.Models;


namespace HengTong.ViewModel._Admin.SysJobPositionVms
{
    public partial class SysJobPositionTemplateVm : BaseTemplateVM
    {
        [Display(Name = "岗位编号")]
        public ExcelPropety CodeExcel = ExcelPropety.CreateProperty<SysJobPosition>(x => x.Code);
        [Display(Name = "岗位名称")]
        public ExcelPropety NameExcel = ExcelPropety.CreateProperty<SysJobPosition>(x => x.Name);
        [Display(Name = "岗位描述")]
        public ExcelPropety DescriptionExcel = ExcelPropety.CreateProperty<SysJobPosition>(x => x.Description);
        [Display(Name = "所属部门")]
        public ExcelPropety GroupExcel = ExcelPropety.CreateProperty<SysJobPosition>(x => x.GroupId);
        [Display(Name = "步进")]
        public ExcelPropety StepExcel = ExcelPropety.CreateProperty<SysJobPosition>(x => x.Step);

	    protected override void InitVM()
        {
            GroupExcel.DataType = ColumnDataType.ComboBox;
            GroupExcel.ListItems = DC.Set<SysGroup>().GetSelectListItems(Wtm, y => y.FullName);
        }

    }

    public class SysJobPositionImportVm : BaseImportVM<SysJobPositionTemplateVm, SysJobPosition>
    {

    }

}
